import { createRouter, createWebHashHistory } from 'vue-router'
import Login from "@/views/Login.vue";
import index from "@/views/index.vue";
import SysMain from "@/views/SysMain.vue";
import SysMain2 from "@/views/SysMain2.vue";
import SysMain3 from "@/views/SysMain3.vue";
import ECharts from "@/views/sys/ECharts.vue";
import Index from "@/views/sys/Index.vue";
import Flight from "@/views/sys/Flight.vue";
import UserMenu from "@/views/sys/UserMenu.vue";
import AfqueryDetailOut from "@/views/sys/AfqueryDetailOut.vue"
import AfqueryDetailEnter from "@/views/sys/AfqueryDetailEnter.vue"
import AfqueryDetailOut1 from "@/views/sys/AfqueryDetailOut1.vue"
import AfqueryDetailEnter1 from "@/views/sys/AfqueryDetailEnter1.vue"
import Tickets from "@/views/sys/Tickets.vue"
import Ticketsaudit from "@/views/sys/Ticketsaudit.vue"
import lugges from "@/views/sys/lugges.vue"
import FilghtChange from "@/views/sys/FilghtChange.vue"
import AirportMap from "@/views/sys/AirportMap.vue"
import Manage from "@/views/sys/Manage.vue"

const routes = [
  {
    path: '/',
    name: 'index',
    component: index
  },
  {
    path: '/login',
    name: 'Login',
    component: Login
  },{
    path: '/main',
    component: SysMain,
    children : [
      {
        path : 'echarts' ,
        component : ECharts
      },
      {
        path : 'index',
        component : Index
      },
      {
        path : 'flight',
        component : Flight
      },
      {
        path : 'user',
        component : UserMenu
      },{
        path : 'fqueryDetailOut1',
        component : AfqueryDetailOut1
      },{
        path : 'fqueryDetailEnter1',
        component : AfqueryDetailEnter1
      }
      ,{
        path : 'Manage',
        component : Manage
      }
    ]
  }, {
    path: '/main2',
    component: SysMain2,
    children : [
      {
        path : 'echarts' ,
        component : ECharts
      },
      {
        path : 'index',
        component : Index
      },
      {
        path : 'flight',
        component : Flight
      },{
        path : 'fqueryDetailOut1',
        component : AfqueryDetailOut1
      },{
        path : 'fqueryDetailEnter1',
        component : AfqueryDetailEnter1
      },{
        path : 'ticketsaudit',
        component : Ticketsaudit
      },{
        path : "FilghtChange",
        component : FilghtChange
      }
    ]
  }, {
    path: '/main3',
    component: SysMain3,
    children : [
      {
        path : 'flight',
        component : Flight
      },
      {
        path : 'index',
        component : Index
      },{
        path : 'fqueryDetailOut',
        component : AfqueryDetailOut
      },{
        path : 'fqueryDetailEnter',
        component : AfqueryDetailEnter
      },
      {
        path : 'tickets',
        component : Tickets
      },
      {
        path : 'lugges',
        component : lugges
      },
      {
        path : 'airportmap',
        component : AirportMap
      }
    ]
  }
]

const router = createRouter({
  history: createWebHashHistory(),
  routes
})

export default router
